package com.zhihao.zhihaopicturebackend.model.dto.user;

import com.zhihao.zhihaopicturebackend.common.PageRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

@ApiModel(description = "查询用户请求")
// 相同对象hashcode一定相等，hashcode相等的两个对象不一定就是同一个对象
@EqualsAndHashCode(callSuper = true)    // 重写父类hashcode,防止equal出错
@Data
public class UserQueryRequest extends PageRequest implements Serializable {

    /**
     * id
     */
    @ApiModelProperty(value = "用户id")
    private Long id;

    /**
     * 用户昵称
     */
    @ApiModelProperty(value = "用户名")
    private String userName;

    /**
     * 账号
     */
    @ApiModelProperty(value = "用户账号")
    private String userAccount;

    /**
     * 简介
     */
    @ApiModelProperty(value = "用户简介")
    private String userProfile;

    /**
     * 用户角色：user/admin/ban
     */
    @ApiModelProperty(value = "用户权限")
    private String userRole;

    private static final long serialVersionUID = 1L;
}
